package com.wicture.erp4android.fragment;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * fragment基类，每个功能模块继承此类界面
 * @author Administrator
 *
 */
public abstract class MyBaseFragment extends Fragment {
	// 依赖的activity对象
	public Activity mActivity;
	private View view;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		mActivity = getActivity();
	}

	@Override
	public View onCreateView(LayoutInflater inflater,
			@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		
			
			return initView();
		
	}

	@Override
	public void onActivityCreated(@Nullable Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onActivityCreated(savedInstanceState);
		initData();
	}
	/**
	 * 初始化布局由子类实现
	 * @return
	 */
	public abstract View initView();
	
	/**
	 * 初始化参数
	 */
	public abstract void initData();
	
}
